package com.xbs.controller.backstage;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xbs.controller.base.BaseServlet;
import com.xbs.entity.RoleEntity;
import com.xbs.service.content.LimitAdminService;

/**
 * 权限分配
 * @author Administrator
 *
 */
@WebServlet("/backstage/limit")
public class LimitServlet extends BaseServlet {
	//服务层对象
	private LimitAdminService as;
	//角色对象
	private List<RoleEntity> relst;
	public LimitServlet() {
		as = new LimitAdminService();
		relst = new ArrayList<RoleEntity>(); 
	}
	
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//获取数据库中所有的角色
		relst = as.selRole();
		req.setAttribute("relst", relst);
		forward("admin/basicSetting/xw_limit");
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
	
		super.doPost(req, resp);
	}
}
